package com.csx.governance.traffic.route.model.swimlane;

import lombok.Data;

import java.util.List;

/**
 * 泳道定义
 * @author cuisongxu
 * @date 2023/2/23 15:52
 */
@Data
public class SwimLaneDefinition {

    private String swimLaneId;

    private String baseSwimLaneId;

    private List<SwimLaneSubDefinition> swimLaneSubDefinitions;

    public String getBaseSwimLaneId() {
        if(baseSwimLaneId == null) {
            return "";
        }
        return baseSwimLaneId;
    }

    @Data
    public static class SwimLaneSubDefinition {

        private String serviceName;

        private String swimLaneKey;

        private String swimLaneValue;

        private String baseSwimLaneId;

        public void setBaseSwimLaneId(String baseSwimLaneId) {
            this.baseSwimLaneId = baseSwimLaneId;
        }
    }
}
